# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=fakeap
pkgver=0.3.2
pkgrel=8
groups=('blackarch' 'blackarch-honeypot')
pkgdesc="Black Alchemy's Fake AP generates thousands of counterfeit 802.11b access points. Hide in plain sight amongst Fake AP's cacophony of beacon frames."
url='http://www.blackalchemy.to/project/fakeap/'
license=('GPL')
depends=('perl')
arch=('any')
source=("http://www.sourcefiles.org/Networking/Tools/Wireless/fakeap-$pkgver.tar.gz")
sha512sums=('827724f9a10d418e5efd2a8a6ec31ad95e0c0006')

prepare() {
  cd "$pkgname-$pkgver"

  sed -i '1i\#!/usr/bin/perl' "$pkgname.pl"
}

package() {
  cd "$pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -m 755 "$pkgname.pl" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" README CREDITS

  cp -a --no-preserve=ownership lists "$pkgdir/usr/share/$pkgname/"
}

